$(function(){
	initTree();
});
function customStansfer(){
	$.ajax({
		 type: "POST",
		 url:"../../authority/synJob/customTransfer",
	     error: function(request){
	    	//$("#customStansfer").css("color","black");
	    	alert("客户流转异常");
	        location.reload();
	      },
		  success: function(data){/*
			 var result = eval(data);
			 $("#customStansfer").css("color","black");
			 if(result=="true"){
				 alert("客户流转异常");
				 location.reload();
			 }else{
				 $("#customStansfer").css("color","black");
				 alert("客户流转异常");
				 location.reload();
			 }
	      */}
	});
	//$("#customStansfer").css("color","red");;
	alert("客户流转时间较长,具体细节请查询后台或日志.................");    
}
  function customAllot(){
	 $.ajax({
		 type: "POST",
		 url:"../../authority/synJob/customAllot",
	     error: function(request){
	    	$("#customAllot").css("color","black");
	    	alert("客户流转异常");
	        location.reload();
	      },
		  success: function(data){/*
			 var result = eval(data);
			 $("#customAllot").css("color","black");
			 if(result=="true"){
				 alert("客户分配异常");
				 location.reload();
			 }else{
				 $("#customAllot").css("color","black");
				 alert("客户分配异常");
				 location.reload();
			 }
	      */}
	}); 
	//$("#customAllot").css("color","red");;
	alert("客户分配时间较长,具体细节请查询后台或日志................");   
	  
  }
  function synEmp(){
	 $.ajax({
		 type: "POST",
		 url:"../../authority/synJob/synEmp",
	     error: function(request){
	    	$("#synEmp").css("color","black");
	    	alert("同步员工异常");
	        location.reload();
	      },
		  success: function(data){/*
			 var result = eval(data);
			 $("#synEmp").css("color","black");
			 if(result=="true"){
				 alert("同步员工异常");
				 location.reload();
			 }else{
				 $("#synEmp").css("color","black");
				 alert("同步员工异常");
				 location.reload();
			 }
	      */}
	});
	//$("#synEmp").css("color","red");;
	alert("同步员工时间较长,具体细节请查询后台或日志.................");  
	  
  }
  
  function synCustomer(){
	 $.ajax({
		 type: "POST",
		 url:"../../authority/synJob/synCustomer",
	     error: function(request){
	    	$("#synCustomer").css("color","black");
	        location.reload();
	      },
		  success: function(data){/*
			 var result = eval(data);
			 $("#synCustomer").css("color","black");
			 if(result=="true"){
				 alert("客户分配异常");
				 location.reload();
			 }else{
				 $("#synCustomer").css("color","black");
				 alert("客户分配异常");
				 location.reload();
			 }
	      */}
	});
	//$("#synCustomer").css("color","red");;
	alert("同步客户时间较长,具体细节请查询后台或日志.................");    
  }
  
  function synIp(){
		 $.ajax({
			 type: "POST",
			 url:"../../authority/synJob/sysnIp",
		     error: function(request){
		    	$("#synCustomer").css("color","black");
		        location.reload();
		      },
			  success: function(data){/*
				 var result = eval(data);
				 $("#synCustomer").css("color","black");
				 if(result=="true"){
					 alert("客户分配异常");
					 location.reload();
				 }else{
					 $("#synCustomer").css("color","black");
					 alert("客户分配异常");
					 location.reload();
				 }
		      */}
		});
		//$("#synCustomer").css("color","red");;
		alert("同步客户时间较长,具体细节请查询后台或日志.................");    
	  }